package org.jjcheng.microservice_config_client;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RefreshScope
@RestController
public class LuckyWordController {
	@Value("${lucky-word}")
	String luckWord;
	
	@RequestMapping("/lucky-word")
	public String showLuckyWord(){
		return "The lucky word is: " + luckWord;
	}
}
